<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>手机号</title>
  <script>
    var reg = /^1[35789]\d{9}$/

    function click(e) {
      var result = reg.test(document.querySelector('#phone').value)
      alert(result)
    }

    window.onload = function() {
      document.querySelector("#btn").onclick = click
    }

  </script>
</head>

<body>
  <form action="#" onsubmit="click">
    <input type="text" id="phone">
    <button id="btn">确定</button>
  </form>
</body>

</html>